/*
 * PrimeNumber.h
 *
 *  Created on: Sep 9, 2009
 *      Author: Thada Pipatcharoenkij 49270325
 */

#ifndef PRIMENUMBER_H_
#define PRIMENUMBER_H_

#include <vector>
#include <iostream>
#include <math.h>

using namespace std;

/**
 * PrimeNumber class to find prime numbers by using method called "Sieve of Erathosthenes"
 */
class PrimeNumber {
public:
	PrimeNumber();
	PrimeNumber(int n);
	virtual ~PrimeNumber();
	void init(int n);
	void start();
	void print();
	void printPrime();
private:
	/** variable to store the size */
	int n;
	/** vector of numbers*/
	vector<int> *numbers;
	/** boolean array store whether number is prime or not*/
	bool *isPrime;
};

#endif /* PRIMENUMBER_H_ */
